/* 
 * File:   hashtable.h
 * Author: ossi
 *
 * Created on October 25, 2011, 6:23 PM
 */

#ifndef HASHTABLE_H
#define	HASHTABLE_H

struct dynarray;

struct json_item;

typedef struct ht_item {
    struct json_item* data;
    wchar_t* key;
    struct ht_item* next;
} ht_item;

typedef struct hashtable {
    struct dynarray* array;
} hashtable;


hashtable* ht_new();

_Bool ht_put(hashtable* ht, wchar_t* key, struct json_item* data);

struct json_item* ht_get(hashtable* ht, wchar_t* key);

void ht_free(hashtable* ht);

#endif	/* HASHTABLE_H */